<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>


<!DOCTYPE HTML ">
<html>
<head>
<%@include file="/WEB-INF/jsp/public/commons.jspf"%>
<title>个人中心</title>
<script type="text/javascript">
 	var isCheckAll = false;  
        function checkall() {  
            if (isCheckAll) {  
                $("input[type='checkbox']").each(function() {  
                    this.checked = false;  
                });  
                isCheckAll = false;  
            } else {  
                $("input[type='checkbox']").each(function() {  
                    this.checked = true;  
                });  
                isCheckAll = true;  
            }  
        }  
 </script>
</head>

<body >
	<%-- <jsp:include page="/WEB-INF/jsp/personalAction/personalTitle.jsp"></jsp:include> --%>
	<div class="container">
		<c:if test="${ topicAuthor.id==user.id}">
			<div id="left" class="col-md-3">
				<div id="info" class="panel panel-success">
					<div class="panel-heading">
						<h3 class="panel-title">个人资料</h3>
					</div>
					<div class="row">
						<div id="photo" class="col-md-4">
							<img
								src="${pageContext.request.contextPath }${session.user.photo}"
								class="img-circle" style="width: 95">
						</div>
						<div class="col-md-7 col-md-offset-1">
							
								<br>&nbsp;&nbsp;&nbsp;
								<s:property value="%{#session.user.name}" />
								<br>
								<a href="personal_updateUI.action" class="btn btn-link btn-sm">修改资料</a>
							
						</div>
					</div>
				</div>
				
				<div id="serve" class="panel panel-success">
					<div class="panel-heading">
						<h3 class="panel-title">个人服务</h3>
					</div>
					<div class="panel-body">
					<table >
						<tr>
						<c:if test="${ user.type==0}">
							<td class="col-md-6">
								<a href="complain_complainUI.action" style="font-size: x-small;">
								<img alt="我要投诉" src="images/Complain.png" style="width: 100%"/>
								<font style="text-align: center;">我要投诉</font></a></td>
							<td class="col-md-6">
								<a href="message_all.action" style="font-size: x-small;">
								<img alt="投诉消息" src="images/Complain_Message.png" style="width: 100%"/>
								投诉消息</a>
							</td>
						</c:if>
						
						<c:if test="${ user.type==2}">
							<td>
								<a href="message_complaint.action" style="font-size: x-small;">
								<img alt="投诉消息" src="images/Complain_Message.png" style="width: 75%;padding-left: 30px;"/>
								  <div style="padding-left: 40px;">投诉消息</div>
								</a>
							</td>
						</c:if>
						
							
						</tr>
					</table>
						
					</div>
				</div>
			</div>
		</c:if>
		<c:if test="${ id==user.id}">
		<div class="col-md-9">
		</c:if>
		<c:if test="${ id!=user.id}">
		<div class="col-md-12">
		</c:if>
		<div id="foruminfo" class="panel panel-success" >
			<div class="panel-heading">
				<c:if test="${ topicAuthor.id==user.id}">
				 <h3 class="panel-title">我的帖子</h3>
				</c:if>
				<c:if test="${ topicAuthor.id!=user.id}">
					<h3 class="panel-title">${topicAuthor.name}的帖子</h3>
				</c:if>
			</div>
			<table class="table table-condensed">
			<thead>
				<tr >
					<td><input type="checkbox" style="float: right;" onclick="checkall()" /></td>
					<td></td>
					<th>发帖主题</th>
					<th>论坛版块</th>
					<th>回贴数量</th>
					<th>发帖时间</th>
				</tr>
			</thead>
			<tbody>
				<s:iterator value="recordList" status="obj">
					<tr>
						<s:set value="recordList[#obj.index][0].id" var="tid" />
						<s:set value="recordList[#obj.index][1].id" var="fid" />
						<td><input type="checkbox" name="checkmessage" value="${tid}"
							style="float: right;" /></td>
						<td></td>
						<td><a href="topic_tiezi.action?id=${tid}"><s:property value="recordList[#obj.index][0].title" /></a> </td>
						<td><a href="topic_list.action?id=${fid}"><s:property value="recordList[#obj.index][1].name" /></a></td>
						<td><s:property value="recordList[#obj.index][0].replyCount" /></td>
						<td><s:date name="recordList[#obj.index][0].postTime"
								format="yyyy-MM-dd HH:mm:ss" /></td>
					</tr>
				</s:iterator>
			</tbody>
		</table>
		<%@include file="/WEB-INF/jsp/public/pageView.jspf"%>
		<form id="pageCondition" action="personal_center.action"></form>
		</div>
		</div>
	</div>
</body>
</html>
